<?php
/* @var $this NewsController */
/* @var $model News */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'news-form',
	'enableAjaxValidation'=>false,
	'htmlOptions' => array('enctype' => 'multipart/form-data'),
)); ?>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'tieude'); ?>
		<?php echo $form->textField($model,'tieude',array('size'=>60,'maxlength'=>100)); ?>
		<?php echo $form->error($model,'tieude'); ?> Tiêu đề dưới 50 ký tự
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'noidung'); ?>
		<?php echo $form->textArea($model,'noidung',array('size'=>60,'maxlength'=>1000)); ?>
		<?php echo $form->error($model,'noidung'); ?> Nội dung dưới 150 ký tự
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'Image'); ?>
		<?php echo $form->fileField($model, 'Image', array('onchange'=>'checkImageFile("News_Image");'));?>
		<?php echo $form->error($model,'Image'); ?> Load hình ảnh kích thước chuẩn: 200 x 80
	</div>
	
	<p class="note">Thông tin bắc buộc <span class="required">*</span> </p>
	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Thêm' : 'Cập nhật'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->